package com.fan.txl.data.loading;

import android.databinding.BaseObservable;
import android.databinding.Bindable;
import android.os.Parcel;
import android.os.Parcelable;

import com.fan.txl.BR;

/**
 * Created by jiajiabao on 17-1-20.
 */

public class Loading  extends BaseObservable implements Parcelable {

    boolean showing=false;

    @Bindable
    public boolean isShowing() {
        return showing;
    }

    public void setShowing(boolean showing) {
        this.showing = showing;
        notifyPropertyChanged(BR.showing);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.showing ? (byte) 1 : (byte) 0);
    }

    public Loading() {
    }

    protected Loading(Parcel in) {
        this.showing = in.readByte() != 0;
    }

    public static final Creator<Loading> CREATOR = new Creator<Loading>() {
        @Override
        public Loading createFromParcel(Parcel source) {
            return new Loading(source);
        }

        @Override
        public Loading[] newArray(int size) {
            return new Loading[size];
        }
    };
}
